<script>
	export default {
		data(){
			return{
				
			}
		},
		globalData:{
			/**
			 * 引入vuex state属性
			 * @param {Object} arr 需要引入的 vuex state属性名数组
			 */
			getState(arr){
				let states = {};
				arr.forEach(v=>{
					 states[v] = function(){return this.$store.state[v]}
				});
				return states;
			},
			/**
			 * 引入vuex Mutations方法
			 * @param {Object} arr 需要引入的 vuex Mutations 方法名数组
			 */
			getMutations(arr){
				let Mutation = {};
				arr.forEach(v=>{
					 Mutation[v] = function(...ages){
						 return this.$store.commit(v,ages);
					 }
				});
				return Mutation;
			}
		},
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
